/**
 * 定义实时数据模块
 */
(function(window, angular, undefined){
	var module = angular.module('water.apps.ws.ehcache.ehcacheManager', ['water.entity.ehcache']);
	
	module.controller('ehcacheManagerController',function($scope,$ehcacheService){

		$scope.key = 'sysDict:stationPollAlarm:hasKey';
		
		$scope.search = function(key){
			$ehcacheService.getValue(key).then(function(data){
				if(data){
					data = data.data;
				}
				$scope.value = data;;
			});
		}
		
		$scope.deleteKey = function(key){
			$ehcacheService.deleteKey(key).then(function(data){
				alert(data.data);
			});
		}
		
	});
}(window, angular));	